\documentclass[hyperref,UTF8,10pt]{beamer}
\usepackage[heading=true]{ctex}
% \usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{comment}
\usepackage{minted}
\setmonofont{Consolas}
\setsansfont{Microsoft YaHei}
\setCJKmainfont{Microsoft YaHei}
\usefonttheme{professionalfonts}
\usepackage{graphicx}
\graphicspath{image/} % storage figure in a sub-folder
\usepackage{tjcolor}
\hypersetup{CJKbookmarks=true}
\usepackage{url}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{booktabs} % for much better looking tables
\usepackage{array} % for better arrays (eg matrices) in maths
%\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfigure} % make it possible to include more than one captioned figure/table in a single float
% These packages are all incorporated in the memoir class to one degree or another...
%\usepackage{threeparttable}
% \usepackage{cases} %equation set
% \usepackage{multirow} %use table
% \usepackage{enumerate}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{xcolor}
\usepackage{bm}
%\usepackage{capt-of}
\setcounter{tocdepth}{1}%只显示section，不显示subsection
\usepackage{listings}
\numberwithin{equation}{section} %按节编号
% \usepackage[colorlinks=true]{hyperref}
\newcommand{\degree}{^\circ}
\newcommand{\ud}{\,\mathrm{d}}

\title{题目}
% \subtitle{English Title}
\author[Peter YU]
{
汇报人：XXXXXX\\
专业：XXXX工程\\ 
指导教师：XXXX教授 \\
}
\institute[Tongji CSGI]{同济大学\quad XXXXXXXX学院}
\date{\today} %Activate to display a given date or no date (if empty),
% otherwise the current date is printed

\begin{document}
%%%%%%%%%% 定理类环境的定义 %%%%%%%%%%
%% 必须在导入中文环境之后
\newcommand{\redstress}[1]{{\color{red}{#1}}}

%----------------------------------------------------------------------
% Title frame
\begin{frame}
\maketitle
\end{frame}

\section{绪论}

\begin{frame}{Frametitle}
    \begin{itemize}
    \item An item.
    \begin{itemize}
    \item A nested item.
    \item[+] A ‘plus’ item.
    \item Another item.
    \end{itemize}
    \item Go back to upper .
    \end{itemize}
\end{frame}

\begin{frame}{Block}
    \begin{block}{Part 1}
        Test.
    \end{block}
    \begin{theorem}[Thm 1]
        Thm.
    \end{theorem}
    \begin{proof}
        Bingo.
    \end{proof}
\end{frame}

\begin{frame}{Enumerate}
    \begin{equation}
        F=ma\label{eq:1}
    \end{equation}
    \begin{enumerate}
        \item First \redstress{important\cite{em1977}}
        \item Second \eqref{eq:1}
    \end{enumerate}
\end{frame}

\begin{comment}

This is comment.

\end{comment}

\section{算法}

\begin{frame}{算法}
    \begin{algorithm}[H]
        \caption{算法1}\label{alg:em}
        \begin{algorithmic}[1]
            \Require Param
            \Ensure $a$
            \Repeat
            \State Compute $a_n$
            \Until convergence
            \Return $a\leftarrow a_n$
        \end{algorithmic}
    \end{algorithm} 
\end{frame}

\begin{frame}{算法2}
    \begin{algorithm}[H]
        \caption{Euclid’s algorithm}\label{alg:euclid}
        \begin{algorithmic}[1] %number every line, 0:no line numbering
        \Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}
        \State $r\gets a\bmod b$
        \While{$r\not=0$}\Comment{We have the answer if r is 0}
        \State $a\gets b$
        \State $b\gets r$
        \State $r\gets a\bmod b$
        \EndWhile\label{alg:euclidendwhile}
        \State \textbf{return} $b$\Comment{The gcd is b}
        \EndProcedure
        \end{algorithmic}
        \end{algorithm}   
\end{frame}

\begin{frame}{图片}
    \begin{figure}
        \centering
        \includegraphics[width=0.85\textwidth]{tj_logo.jpg}
        \caption{同济大学}\label{fig:tj}
    \end{figure}
\end{frame}

\begin{frame}{分栏}
    \begin{columns}
        \begin{column}{0.3\textwidth}
            \begin{figure}
                \centering
                \includegraphics[width=0.95\textwidth]{tj_logo.jpg}
                \caption{TJU}\label{fig:tju}
            \end{figure}
        \end{column}
        \begin{column}{0.7\textwidth}
            \begin{itemize}
                \item ...
            \end{itemize}
        \end{column}
    \end{columns}
\end{frame}

\begin{frame}{Subfigure}
    \begin{figure}
        \centering
        \subfigure[]{\includegraphics[width=0.47\textwidth]{tj_logo.jpg}}
        \subfigure[]{\includegraphics[width=0.47\textwidth]{tjbackground1.jpg}}
        \caption{Subfigure\footnote{See: \url{www.tongji.edu.cn}}}\label{fig:rnn}
    \end{figure}
\end{frame}

% To put the content of a frame in several pages, use allowframebreaks
\begin{frame}[allowframebreaks]{Longframe}
    \begin{itemize}
        \item 1
        \item 2
        \item 3
        \item 4
        \item 5
        \item 6
        \item 7
        \item 8
        \item 9
        \item 10
    \end{itemize}
    \begin{enumerate}
        \item 1
        \item 2
        \item 3
        \item 4
        \item 5
        \item 6
        \item 7
        \item 8
        \item 9
        \item 10
    \end{enumerate}
\end{frame}

\section{仿真}

\begin{frame}{More block}
    \begin{example}{Example}
    Eg1.
    \end{example}
    \begin{alert}{Attention}
        Test block!
    \end{alert}
\end{frame}

\begin{frame}{表格}
    \begin{table}[]
        \centering
        \caption{数据}
        \label{tab1}
        \begin{tabular}{p{3cm}cccc}
        \toprule
        & $q$    & $r$ & $a$ & $p$           \\ 
        \midrule
        实际值   & $1$  & $5$  & 2   & 3  \\
        方法1    & $4$ & $3$ & 1 & 1\\
        方法2    & $4$ & $3$ & 2 & 2\\
        方法3    & $5$ & $2$ & 3 & 3\\
        方法4    & $4$ & $2$ & 2 & 2\\ \bottomrule
        \end{tabular}
    \end{table}
\end{frame}

\begin{frame}[fragile]
\frametitle{代码}
\begin{minted}[linenos]{java}
public class Hello
{
      public static void main(String args[])
      {
      System.out.println("hello,world");
      }
}
\end{minted}
\end{frame}

\section{总结与展望}

\begin{frame}{结论}
    \begin{description}
        \item[I] First of all
        \item[II] Besides
        \item[III] Last but not least
    \end{description}
\end{frame}

\begin{frame}{致谢}
 \centering
 \Huge 谢谢大家！
\end{frame}

\begin{frame}{参考文献}
\bibliography{slides}
\bibliographystyle{ieeetr}
\end{frame}

\end{document}
